package kis.designpattern.observer;


public class Display1 implements ObServer,DisplayElement {
	private int temp;
	private int humidity;
	private int perssure;
	private Subject wd;
	public Display1(Subject wd)
	{
		this.wd=wd;
		wd.addOb(this);
	}

	public void update(int temp, int humidity, int perssure)
	{
		this.temp = temp;
		this.humidity = humidity;
		this.perssure = perssure;
		display();
	}

	public void display()
	{
		System.out.println("the element is " + temp + "," + humidity + "," + perssure);
	}

}
